package com.huangsm.book.designmodel.string;

/**
 * 效率更高的分割Api
 * @author huang
 * @PACKAGE_NAME com.huangsm.book.designmodel.string
 * @PROJECT_NAME concurrence
 * @date 2019/2/15
 */
public class StringTokenizer {
    public static void main(String[] args) {
        String orgStr="a;b;c";
        java.util.StringTokenizer st=new java.util.StringTokenizer(orgStr,";");
        while (st.hasMoreTokens()){
            String s = st.nextToken();
            System.out.println(s);
        }
        st=new java.util.StringTokenizer(orgStr,";");
    }
}
